import request from '@/utils/request';

export function checkAllDorm() {
  return request({
    url: "/dormitory/reg/checkAllDorm",
    method: "POST"
  });
}

export function checkDorm(ksh) {
  return request({
    url: "/dormitory/reg/checkDorm/" + ksh,
    method: "POST"
  });
}


export function countMajorTop10() {//空
  return request({
    url: "/system/reg/countMajorTop10",
    method: "get"
  });
}


export function countDept() {
  return request({
    url: "/system/reg/countDept",
    method: "get"
  });
}

export function countArea() {
  return request({
    url: "/system/reg/countArea",
    method: "get"
  });
}


export function countNowAt() {
  return request({
    url: "/system/reg/countNowAt",
    method: "get"
  });
}

export function countGender() {
  return request({
    url: "/system/reg/countGender",
    method: "get"
  });
}

export function importDbf(data) {
  return request({
    url: "/system/reg/addDbfData",
    headers: { 'Content-type': "multipart/form-data" },
    method: "post",
    data
  });
}

//统计报到状态
export function countStatus() {
  return request({
    url: "/system/reg/count",
    method: "get"
  });
}

export function doReg(data) {
  return request({
    url: "/system/reg/addStuRegList",
    method: "post",
    data: data
  });
}


export function getOwnInfo() {
  return request({
    url: "/system/reg/getOwnInfo",
    method: "post"
  });
}

//导入
export function importInfo(data) {
  return request({
    url: '/system/reg/addSrsStuRegList',
    method: 'post',
    data: data
  })
}

// 查询新生报到学生注册信息列表
export function listReg(query) {
  return request({
    url: '/system/reg/list',
    method: 'get',
    params: query
  })
}

// 查询新生报到学生注册信息详细
export function getReg(id) {
  return request({
    url: '/system/reg/' + id,
    method: 'get'
  })
}

// 新增新生报到学生注册信息
export function addReg(data) {
  return request({
    url: '/system/reg',
    method: 'post',
    data: data
  })
}

// 修改新生报到学生注册信息
export function updateReg(data) {
  return request({
    url: '/system/reg/update',
    method: 'post',
    data: data
  })
}

// 删除新生报到学生注册信息
export function delReg(data) {
  return request({
    url: '/system/reg/delete',
    method: 'post',
    data
  })
}
